package com.updesignsz.admin.service;

import com.updesignsz.admin.mapper.ModuleMapper;
import com.updesignsz.admin.vo.form.ModuleForm;
import com.updesignsz.commom.entity.Module;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TODO
 * Created User: lx
 * Date: 2020/4/29 15:37
 */
@Service
public class ModuleService {
    @Autowired
    private ModuleMapper moduleMapper;

    public void deleteModule(Integer id) {
        moduleMapper.deleteModule(id);
    }

    public List<Module> listAll() {
        return moduleMapper.listAll();
    }

    public void saveModule(ModuleForm form) {
        moduleMapper.saveModule(form);
    }

    public void updateModule(ModuleForm form) {
        moduleMapper.updateModule(form);
    }

    public Module getById(Integer id) {
        return moduleMapper.getById(id);
    }
}
